<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>产品信息</title>
		
		<!-- BOOTSTRAP STYLES-->
    <link href="../assets/css/bootstrap.css" rel="stylesheet" />
     <!-- FONTAWESOME STYLES-->
    <link href="../assets/css/font-awesome.css" rel="stylesheet" />
     <!-- MORRIS CHART STYLES-->
    <link href="../assets/js/morris/morris-0.4.3.min.css" rel="stylesheet" />
        <!-- CUSTOM STYLES-->
    <link href="../assets/css/custom.css" rel="stylesheet" />
     <!-- GOOGLE FONTS-->
   <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
		
		 <!-- /. WRAPPER  -->
    <!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
    <!-- JQUERY SCRIPTS -->
    <script src="../assets/js/jquery-1.10.2.js"></script>
      <!-- BOOTSTRAP SCRIPTS -->
    <script src="../assets/js/bootstrap.min.js"></script>
    <!-- METISMENU SCRIPTS -->
    <script src="../assets/js/jquery.metisMenu.js"></script>
     <!-- MORRIS CHART SCRIPTS -->
     <script src="../assets/js/morris/raphael-2.1.0.min.js"></script>
    <script src="../assets/js/morris/morris.js"></script>
      <!-- CUSTOM SCRIPTS -->
    <script src="../assets/js/custom.js"></script>
		
		
		<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
		<script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js"></script>

		<script type="text/javascript" src="../js/product.js"></script><script src="../js/time.js"></script>
		
  </head>
  
  <body>
             
     <div id="wrapper">
        <nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
               
                <a class="navbar-brand" href="index.jsp">首页</a> 
            </div>
  <div style="color: white;
			padding: 15px 50px 5px 50px;
			float: right;
			font-size: 16px;"> <span id="Clock"></span>欢迎<%=session.getAttribute("me")%>
			&nbsp; <a href="../invalidateServlet" class="btn btn-danger square-btn-adjust">Logout</a> </div>
        </nav>   
           <!-- /. NAV TOP  -->
                <nav class="navbar-default navbar-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav" id="main-menu">
				<li class="text-center">
                    <img src="../assets/img/find_user.png" class="user-image img-responsive"/>
					</li>
				
					<li>
                        <a href="#"><i class="fa fa-edit fa-3x"></i> 基本信息<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                             <li>
                                <a href="product.jsp">产品列表</a>
                            </li>
                            <li>
                                <a href="productType.jsp">产品类型列表</a>
                            </li>
                            <li>
                                <a href="user.jsp">用户列表</a>
                            </li>
                        </ul>
                      </li>  
					
					<li>
                        <a  href="orders.jsp"><i class="fa fa-table fa-3x"></i> 所有销售记录</a>
                    </li>
					
					<li  >
                        <a  href="../order.jsp"><i class="fa fa-desktop fa-3x"></i> 销售前台 </a>
                    </li>
                    
					<li>
                        <a href="#"><i class="fa fa-bar-chart-o fa-3x"></i>图形报表<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                           <li>
                                <a href="moneyReport.jsp">月销售额报表</a>
                            </li>
                            <li>
                                <a href="numReport.jsp">产品销量报表</a>
                            </li>
                           
                        </ul>
                      </li>   
                      
                  
                </ul>
               
            </div>
            
        </nav>  
        <!-- /. NAV SIDE  -->
        <div id="page-wrapper" >
            <div id="page-inner">
            
            
		<div class="container">
			<h3 class="col-sm-offset-1">产品列表</h3><hr/>
			
			<form class="form-inline" id="product_query_form">
			  <div class="form-group">
			    <label for="name">产品名称</label>
			    <input name="name" type="text" class="form-control" id="name" placeholder="奶茶">
			  </div>
		      <button type="button" class="btn btn-default" onclick="listProduct();">查询</button>
			</form><br/>
			
			<table class="table table-striped" id="products">
			</table>
			
			<button type="button" class="btn btn-primary" onclick="location.href='<%=request.getAttribute("base")%>/jsp/product_add.jsp'">新增产品</button>
			<button type="button" class="btn btn-default" onclick="history.go(-1)">返回</button>
		</div>
		
            </div>
             <!-- /. PAGE INNER  -->
            </div>
         <!-- /. PAGE WRAPPER  -->
        </div>
    
    
	
	
	</body>
		
	<script type="text/javascript">
		var base = '<%=request.getAttribute("base")%>';
		$(function() {
			listProduct();
		});
	</script>
</html>